package com.kwk.messagepushding;

import com.kwk.messagepushding.service.DingTalkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * @author gyl
 * @date 2024/9/5 10:30:58
 */
@Component
public class StartupRunner implements CommandLineRunner {

    @Autowired
    private DingTalkService myService;

    @Override
    public void run(String... args) throws Exception {
        // 启动时调用Service层的方法
        myService.setRedis();
    }
}
